package com.hw.one.peach.core.util;

/**
 * Created by Administrator on 2017/8/14.
 * 转换渣土车code对应的意义
 * @author 李亚坤
 */
public class MovingSourceUtil {


    /**
     * 转换渣土车code对应的意义
     * 车辆状态
     * @author 李亚坤
     * @createtime 2017年8月14日15:16:47
     * @param deviceStatus
     * @return
     */
    public static String changeDeviceStatus(String deviceStatus) {
        switch (deviceStatus){
            case "0":
                return "本地待命";
            case "1":
                return "维修";
            case "2":
                return "事故";
            case "3":
                return "停用";
            case "4":
                return "短盘";
            case "5":
                return "审车";
            case "6":
                return "营运";
            case "7":
                return "异地待命";
            case "8":
                return "停运";
            case "9":
                return "禁运";
            default:
                return deviceStatus;
        }
    }

    /**
     * 转换渣土车code对应的意义
     * 行驶状态
     * @param runningStatus
     * @return
     */
    public static String changeRunningStatus(String runningStatus) {
        switch (runningStatus) {
            case "0":
                return "未行驶";
            case "1":
                return "正在行驶";
            default:
                return runningStatus;
        }
    }

    /**
     * 转换渣土车code对应的意义
     * 报警状态
     * @param alarmStatus
     * @return
     */
    public static String changeAlarmStatus(String alarmStatus) {
        switch (alarmStatus) {
            case "0":
                return "未报警";
            case "1":
                return "报警";
            default:
                return alarmStatus;
        }
    }
}
